package cloud.keveri.gateway.config.nacos.configure;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

/**
 * <p>
 * 作者：沈自在
 **/
@Setter
@Getter
public class NacosConfig {

    /**
     *
     */
    private String url;

    /**
     *
     */
    private String namespace;

    /**
     *
     */
    private String group;

    /**
     *
     */
    private String username;

    /**
     *
     */
    private String password;

    /**
     *
     */
    private NacosACMConfig acm;

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        NacosConfig that = (NacosConfig) o;
        return Objects.equals(url, that.url)
                && Objects.equals(namespace, that.namespace)
                && Objects.equals(username, that.username)
                && Objects.equals(password, that.password)
                && Objects.equals(acm, that.acm);
    }

    @Override
    public int hashCode() {
        return Objects.hash(url, namespace, username, password, acm);
    }

    @Override
    public String toString() {
        return "NacosConfig{"
                + "url='"
                + url
                + '\''
                + ", namespace='"
                + namespace
                + '\''
                + ", username='"
                + username
                + '\''
                + ", password='"
                + password
                + '\''
                + ", acm="
                + acm
                + '}';
    }
}
